package ooday02zy1;

public class Student extends Person{
    String className;
    String stuId;
    Student(String name,int old,String address,String className,String stuId){
        super(name,old,address);
        this.className=className;
        this.stuId=stuId;
    }
    void study(){
        System.out.println("我叫"+name+"，我在学习");
    }
    void sayHi() {
        System.out.println("你好我叫" + name + ",今年" + old + "岁了，我是" + address + "人..."+"我是"+className+"学生,学号是"+stuId);
    }

















    /*
    String className;
    String stuId;
    Student(String name,int old,String address,String className,String stuId){
        super(name,old,address);
        this.className=className;
        this.stuId=stuId;
    }
    void study(){
        System.out.println("我叫"+name+"，我在学习");
    }
    void sayHi() {
        System.out.println("你好我叫" + name + ",今年" + old + "岁了，我是" + address + "人..."+"我是"+className+"学生,学号是"+stuId);
}

     */
}